package com.bzframework.movierecommend.client.tmdb.config;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class TMDBClientInterceptor implements RequestInterceptor {

    private final TMDBConfiguration tmdbConfiguration;

    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header("Authorization", "Bearer " + tmdbConfiguration.getApiKey());
    }

}
